
var childNode = ""
var showCartInfo = function (parent,goodsList) {
    totalPrice = 0
    for (var i = 0; i < goodsList.length; ++i) {
        goods = goodsList[i]
        childNode += "<ul class='cart_list_td' gid="+goods['goods_id']+">" +
            "           <li class='td_img'>" +
            "               <img src=" + goods['info']['img'] + "  alt=''>" +
            "           </li>" +
            "           <li class='td_name'>" +
                            goods['info']['title'] +
            "           </li>" +
            "           <li class='td_price'>" + goods['info']['price'] + "</li>" +
            "           <li class='td_count'>" + goods['amount'] + "</li>" +
            "           <li class='td_sum'>" + goods['total_price'] + "</li>" +
            "           <li class='td_op'>" +
            "              <a href='#' class='delete_g'>删除</a>" +
            "           </li>" +
            "         </ul>"
        totalPrice+=parseFloat(goods['total_price'])
    }
    $(parent).html(childNode)
    $('#id_count').text(goodsList.length)
    $('#id_total_price').text(totalPrice)
}